package com.gzz.orchid.context.application.base.convert;


import com.gzz.orchid.context.application.base.command.DirectorySaveCmd;
import com.gzz.orchid.context.application.base.pojo.DirectoryDto;
import com.gzz.orchid.context.application.base.pojo.DirectoryVo;
import com.gzz.orchid.context.infrastructure.persistence.entity.base.BaseDirectoryPo;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;
import org.mapstruct.ReportingPolicy;
import org.mapstruct.factory.Mappers;

/**
 * @author higmd
 */
@Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface DirectoryConverter {
    DirectoryConverter INSTANCE = Mappers.getMapper(DirectoryConverter.class);

    DirectoryVo mapVo(BaseDirectoryPo po);

    DirectoryDto mapDto(BaseDirectoryPo po);

    void updatePo(@MappingTarget BaseDirectoryPo po, DirectorySaveCmd cmd);
}
